package org.jeecg.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 采购单主表
 * @Author: jeecg-boot
 * @Date: 2023-07-17
 * @Version: V1.0
 */
@Data
@TableName("wms_purchase_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="wms_purchase_order对象", description="采购单主表")
public class WmsPurchaseOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 采购单号
     */
    @Excel(name = "采购单号", width = 15)
    @ApiModelProperty(value = "采购单号")
    private String purchaseNo;

    /**
     * 供应商
     */
    @Excel(name = "供应商", width = 15)
    @ApiModelProperty(value = "供应商")
    private String supplier;

    /**
     * 预计到货日期
     */
    @Excel(name = "预计到货日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "预计到货日期")
    private Date expectedArrivalDate;

    /**
     * 总金额
     */
    @Excel(name = "总金额", width = 15)
    @ApiModelProperty(value = "总金额")
    private BigDecimal totalAmount;

    /**
     * 状态（1-草稿，2-待审批，3-已审批，4-部分入库，5-已完成，6-已取消）
     */
    @Excel(name = "状态", width = 15, dicCode = "purchase_order_status")
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 是否自动生成（0-否，1-是）
     */
    @Excel(name = "是否自动生成", width = 15, dicCode = "yn")
    @ApiModelProperty(value = "是否自动生成")
    private Integer isAutoGenerated;

    /**
     * 是否执行完成
     */
    @Excel(name = "是否执行完成", width = 15, dicCode = "yn")
    @ApiModelProperty(value = "是否执行完成")
    private Integer isCompleted;

    /**
     * 退换货状态（0-无需退换货、1-等待处理、2-退货、3-换货）
     */
    @Excel(name = "退换货状态", width = 15, dicCode = "return_exchange_status")
    @ApiModelProperty(value = "退换货状态（0-无需退换货、1-等待处理、2-退货、3-换货）")
    private Integer returnExchangeStatus;

    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    private String approveBy;

    /**
     * 审核人员名称
     */
    @Excel(name = "审核人员", width = 15)
    @ApiModelProperty(value = "审核人员")
    @TableField(exist = false)
    private String approveName;

    /**
     * 审核时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核时间")
    private Date approveTime;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;
} 